﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess;
using DataAccess.BusinessEntities;

namespace DataAccess.UnitTests
{
    public class InMemoryUnitOfWork : IUnitOfWork
    {
        /// <summary>
        /// Initializes a new instance of the InMemoryUnitOfWork class.
        /// </summary>
        public InMemoryUnitOfWork()
        {
            this.Committed = false;
            this.Disposed = false;
        }

        public IRepository<Store> Stores { get; set; }

        public IRepository<User> Users { get; set; }

        public IRepository<PersonalLocation> PersonalLocations { get; set; }

        public void Commit()
        {
            this.Committed = true;
        }

        public bool Committed { get; set; }

        public bool Disposed { get; set; }

        public void Dispose()
        {
            this.Disposed = true;
        }

        public IRepository<Product> Products { get; set; }

        public IRepository<Substance> Substances { get; set; }

        public IRepository<Container> Containers { get; set; }
    }
}